#!/usr/bin/env bash
#
# author: feihai
#* 
# 进入docker容器
#*

err() {
    printf 'error: %s\n' "$1" >&2
    exit 1
}

[[ $1 ]] || err "Usage: $0 <containerName> [cmd]"

main() {
  docker exec -it $1 "${2:-sh}"
}
main "$@"
